//
//  ByNewsVC.m
//  hutouben_ios
//
//  Created by mc on 16/11/29.
//  Copyright © 2016年 mc. All rights reserved.
//

#import "ByNewsVC.h"
#import "ByLoginVC.h"
#import "ByAddressVC.h"
#import "ByOrderVC.h"
@interface ByNewsVC ()

@end

@implementation ByNewsVC

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
     [self addBYItemviews:@[@"登录"] mode:ByNavigationItemModeText position:ByNavigationItemPositionModeRight];
    [self addBYItemviews:@[@"地址",@"订单"] mode:ByNavigationItemModeText position:ByNavigationItemPositionModeLeft];
}
-(void)rightItemsAction:(NSInteger)rightIndex{
    ByLoginVC *vc = [[ByLoginVC alloc] init];
    [self by_normalPush:vc hasNavi:YES];
}
-(void)leftItemsAction:(NSInteger)leftIndex{
    if (leftIndex == 0) {
        ByAddressVC *vc = [[ByAddressVC alloc] init];
        [self by_normalPush:vc hasNavi:YES];

    }else{
        ByOrderVC *vc = [[ByOrderVC alloc] init];
        [self by_normalPush:vc hasNavi:YES];
    
    }
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
